<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>

	<!-- 1、属性 -->
	<properties resource="config.properties">
		<property name="username" value="root" />
		<property name="password" value="123456" />
	</properties>

	<!-- 2、设置 -->
	<settings>
		<setting name="logImpl" value="LOG4J" />
		<setting name="cacheEnabled" value="true" />
		<setting name="lazyLoadingEnabled" value="true" />
		<setting name="multipleResultSetsEnabled" value="true" />
		<setting name="useColumnLabel" value="true" />
		<setting name="useGeneratedKeys" value="false" />
		<setting name="autoMappingBehavior" value="PARTIAL" />
		<setting name="autoMappingUnknownColumnBehavior"
			value="WARNING" />
		<setting name="defaultExecutorType" value="SIMPLE" />
		<setting name="defaultStatementTimeout" value="25" />
		<setting name="defaultFetchSize" value="100" />
		<setting name="safeRowBoundsEnabled" value="false" />
		<setting name="mapUnderscoreToCamelCase" value="false" />
		<setting name="localCacheScope" value="SESSION" />
		<setting name="jdbcTypeForNull" value="OTHER" />
		<setting name="lazyLoadTriggerMethods"
			value="equals,clone,hashCode,toString" />
	</settings>

	<!-- 3、别名 -->
	<typeAliases>
		<typeAlias alias="User"
			type="com.yiibai.mybatis.models.User" />
	</typeAliases>

	<!-- 4、类型处理器 -->
	<typeHandlers>
		<typeHandler
			handler="com.mybatis.typeHandler.ExampleTypeHandler" />
	</typeHandlers>

	<!-- 5、对象工厂（objectFactory） -->
<!-- 	<objectFactory
		type="org.mybatis.example.ExampleObjectFactory">
		<property name="someProperty" value="100" />
	</objectFactory>
 -->
	<!-- 6、插件（plugins） -->
<!-- 	<plugins>
		<plugin interceptor="org.mybatis.example.ExamplePlugin">
			<property name="someProperty" value="100" />
		</plugin>
	</plugins> 
-->

	<!-- 7、配置环境（environments） -->
	<environments default="development">
		<environment id="development">
			<transactionManager type="JDBC" />
			<dataSource type="POOLED">
				<property name="driver" value="${driver}" />
				<property name="url" value="${url}" />
				<property name="username" value="${username}" />
				<property name="password" value="${password}" />
			</dataSource>
		</environment>
	</environments>
	
	<!-- 8、databaseIdProvider（数据库厂商标识） -->
	
	
	<!-- 9、映射器（mappers） -->
	<mappers>
		<!-- // power by http://www.yiibai.com -->
		<mapper resource="com/yiibai/mybatis/models/User.xml" />
	</mappers>
</configuration>